/*
    Copyright 2006 Andrew Wilkinson <andrew@indiegigs.co.uk>

    This file is part of libgp2x.

    libgp2x is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    libgp2x is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with libgp2x; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

#define GP2x_INTERNAL
#include "gp2x_internal.h"

#ifdef main
#undef main
#endif
int GP2x_main();

int main(int argv, char* argc[]) {
    int rv;
    if(argv != 3) {
        fprintf(stderr, "The 940t binary must be run with the two key files as arguments.\n");
        return 1;
    }
    printf("GP2x 940 starting.\n");
    GP2x_shared_memory_init(argc[1], argc[2]);

    GP2x_upper_memory_init(16*1024*1024, 16*1024*1024);
    GP2x_video_init();
    GP2x_message_init();
    GP2x_input_init();

    printf("GP2x 940 running.\n");
    rv = GP2x_main();
    printf("GP2x 940 ended.\n");
    return rv;
}
